﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cspl.AnimalFight.Lib.Data
{
    public abstract class AnimalBase
    {
        #region Protected Fields

        protected string _animalName;
        protected int _helathPower;
        protected int _defensePower;
        protected int _attackPower;
        protected bool _hasEscaped;
        protected bool _isDead;

        #endregion

        #region Properties

        public string Name
        {
            get { return _animalName; }
            set { _animalName = value; }
        }

        public int HP
        {
            get { return _helathPower; }
            set { _helathPower = value; }
        }

        public int DP
        {
            get { return _defensePower; }
            set { _defensePower = value; }
        }

        public int AP
        {
            get { return _attackPower; }
            set { _attackPower = value; }
        }

        public bool HasEscaped
        {
            get { return _hasEscaped; }
            set { _hasEscaped = value; }
        }

        public bool IsDead
        {
            get { return _isDead; }
            set { _isDead = value; }
        }
        
        #endregion

        public virtual void Escape()
        {
            this.HasEscaped = true;
            Console.WriteLine("The Animal Escaped.");
        }
    }
}
